// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless;

public sealed partial class SegmentsStats
{
	/// <summary>
	/// <para>Total number of segments across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("count")]
	public int Count { get; init; }

	/// <summary>
	/// <para>Total amount of memory used for doc values across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("doc_values_memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? DocValuesMemory { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("doc_values_memory_in_bytes")]
	public long DocValuesMemoryInBytes { get; init; }

	/// <summary>
	/// <para>This object is not populated by the cluster stats API.<br/>To get information on segment files, use the node stats API.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("file_sizes")]
	public IReadOnlyDictionary<string, Elastic.Clients.Elasticsearch.Serverless.IndexManagement.ShardFileSizeInfo> FileSizes { get; init; }

	/// <summary>
	/// <para>Total amount of memory used by fixed bit sets across all shards assigned to selected nodes.<br/>Fixed bit sets are used for nested object field types and type filters for join fields.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("fixed_bit_set")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? FixedBitSet { get; init; }

	/// <summary>
	/// <para>Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("fixed_bit_set_memory_in_bytes")]
	public long FixedBitSetMemoryInBytes { get; init; }
	[JsonInclude, JsonPropertyName("index_writer_max_memory_in_bytes")]
	public long? IndexWriterMaxMemoryInBytes { get; init; }

	/// <summary>
	/// <para>Total amount of memory used by all index writers across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("index_writer_memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? IndexWriterMemory { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("index_writer_memory_in_bytes")]
	public long IndexWriterMemoryInBytes { get; init; }

	/// <summary>
	/// <para>Unix timestamp, in milliseconds, of the most recently retried indexing request.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("max_unsafe_auto_id_timestamp")]
	public long MaxUnsafeAutoIdTimestamp { get; init; }

	/// <summary>
	/// <para>Total amount of memory used for segments across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? Memory { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("memory_in_bytes")]
	public long MemoryInBytes { get; init; }

	/// <summary>
	/// <para>Total amount of memory used for normalization factors across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("norms_memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? NormsMemory { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("norms_memory_in_bytes")]
	public long NormsMemoryInBytes { get; init; }

	/// <summary>
	/// <para>Total amount of memory used for points across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("points_memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? PointsMemory { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used for points across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("points_memory_in_bytes")]
	public long PointsMemoryInBytes { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("stored_fields_memory_in_bytes")]
	public long StoredFieldsMemoryInBytes { get; init; }
	[JsonInclude, JsonPropertyName("stored_memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? StoredMemory { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("term_vectors_memory_in_bytes")]
	public long TermVectorsMemoryInBytes { get; init; }

	/// <summary>
	/// <para>Total amount of memory used for term vectors across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("term_vectory_memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TermVectoryMemory { get; init; }

	/// <summary>
	/// <para>Total amount of memory used for terms across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("terms_memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? TermsMemory { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("terms_memory_in_bytes")]
	public long TermsMemoryInBytes { get; init; }

	/// <summary>
	/// <para>Total amount of memory used by all version maps across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("version_map_memory")]
	public Elastic.Clients.Elasticsearch.Serverless.ByteSize? VersionMapMemory { get; init; }

	/// <summary>
	/// <para>Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes.</para>
	/// </summary>
	[JsonInclude, JsonPropertyName("version_map_memory_in_bytes")]
	public long VersionMapMemoryInBytes { get; init; }
}